package org.example.bean;

import org.example.Animal;
import org.example.Feedable;

public class Tiger extends Animal implements Feedable {
    private int stripes;

    public Tiger(String name, int age) {
        super(name, age);
    }

    public int getStripes() {
        return stripes;
    }

    public void setStripes(int stripes) {
        this.stripes = stripes;
    }

    public Tiger(String name, int age, int stripes) {
        super(name, age);
        this.stripes = stripes;
    }

    @Override
    public void feed() {
        System.out.println("正在给老虎喂食生肉");
    }
    @Override
    public void makeSound(){
        System.out.println("老虎发出咆哮");
    }
    @Override
    public String toString() {
        return "动物姓名："+getName()+","+"动物年龄"+getAge()+","+"老虎条纹的数量："+getStripes();
    }
}
